home *** CD-ROM | disk | FTP | other *** search
- Path: sdcc12.ucsd.edu!cs!galvarez
- From: galvarez@cs.ucsd.edu (Guillermo Alvarez)
- Newsgroups: comp.sys.cbm
- Subject: Re: Unlock Disk, 1541
- Date: 19 Apr 1996 19:09:20 GMT
- Organization: CSE Dept., UC San Diego
- Distribution: world
- Message-ID: <4l8od0$eng@sdcc12.ucsd.edu>
- References: <3176F97B.1390@esbjehs.dk> <3177c00b.1948181@199.181.141.3>
- NNTP-Posting-Host: beowulf.ucsd.edu
-
-
- What Tony suggests is true; however, I did it much more easily in my
- 1571 several years ago. I had a ROM disassembly of the drive, and there
- I found the couple of instructions that checked for this special value
- on the disk. I simply copied the whole ROM to RAM, altered this couple
- of bytes so that the result of the test would be irrelevant, and changed
- the memory map of the drive to use the modified routines in RAM. I then
- used the DOS interface as usual to overwrite the sector, and got the job
- done.
-
- Guillermo
-
- In article <3177c00b.1948181@199.181.141.3>, Tony Postmayer (tonyp@wizvax.wizvax.net) writes:
- |> On Thu, 18 Apr 1996 19:24:59 -0700, Ejner <d6kn@esbjehs.dk> wrote:
- |>
- |> >Does anyone know how to unlock a locked disk (1541 formattet) ?
- |> >It has been locked by changing the $41 value in position 2 of track 18,
- |> >sector 00... Instead of $41, it now reads $42... When I try changing it
- |> >back, it fails, ┤coz it thinks the disk is another format than 1541...
- |> >How can I change it back? I use MC...
- |> >
- |> >Notice: I have programs for it, but I want to know how!! :-)
- |> >
- |> Essentially, you have to read the sector into memory, make the desired
- |> alterations, and write it back out. The trick is you have to write it
- |> out without using the 1541 DOS in order to avoid the error detection
- |> that is stopping you.
- |>
- |> No doubt there are shortcut ways to do this, perhaps by doing a little
- |> preliminary setup and then calling some 1541 ROM routines directly. A
- |> lot of that stuff has been written up in magazines over the years. I
- |> prefer to do it the hard way which is to control the entire process
- |> though machine code routines which execute in the drive. I only call
- |> a minimum of ROM routines, such as the GCR conversion ones.
- |>
- |> This is by no means a simple feat. You have to be a top notch ML
- |> programmer and have good information on the architecture of the drive.
- |> (for example, a copy of the book Inside Commodore DOS)
- |>
- |> My advice to you, if you want to take up the challenge, is to get a
- |> copy of one of the many fast format routines and disassemble it. When
- |> you've studied that and learned all the steps needed to format a 1541
- |> disk you'll be able to solve your present problem as well as many
- |> more. I recommend the format code from the "Fast Hack Em" disk
- |> utility - it's the most direct and concise one I've seen.
- |>
- |> Just to give you an idea, here's a rough flowchart of what has to be
- |> done:
- |>
- |> Turn the motor on and give it time to come up to speed
- |> Figure out what track you are on
- |> Step the head to the target track
- |> Seek the target sector
- |> Read in the target data block
- |> Convert from GCR to Petscii
- |>
- |> Make your alterations
- |>
- |> Convert from Petscii to GCR
- |> Seek the target sector
- |> Write out the data
- |> Shut everything down
- |>
- |> Good luck.
- |>
- |> Tony -
- |>
-